<?php
class video_check_list extends Model
{
    public $programme_id;
    public $status;
    public $push_time;

    public static function getTableName()
    {
        return 'video_check_list';
    }

    public function getPrimaryKey()
    {
        return array('programme_id');
    }

    public function set($obj)
    {
        foreach (get_object_vars($this) as $field => $value) {
            $this->$field = isset($obj->$field) ? $obj->$field : '';
        }
    }

    public function findOne($id)
    {
		return self::$dbo['portal_check_video_r']->findInstance($this->getTableName(),$id);
    }

    public function findAllByStatus($status='no')
    {
        return Model::$dbo['portal_check_video_r']->find(__CLASS__, 'status=?', array($status));
    }

    public function insert($obj)
    {
        return Model::$dbo['portal_check_video_w']->insert($obj);
    }

    public function update($obj)
    {
        return Model::$dbo['portal_check_video_w']->save($obj);
    }
}
?>
